Optimal. Leaf size=61 \[ -\frac {a^3}{2 d (1-\cos (c+d x))^2}+\frac {2 a^3}{d (1-\cos (c+d x))}+\frac {a^3 \log (1-\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3964, 45}
\begin {gather*} \frac {2 a^3}{d (1-\cos (c+d x))}-\frac {a^3}{2 d (1-\cos (c+d x))^2}+\frac {a^3 \log (1-\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3964
Rubi steps
\begin {align*} \int \cot ^5(c+d x) (a+a \sec (c+d x))^3 \, dx &=-\frac {a^6 \text {Subst}\left (\int \frac {x^2}{(a-a x)^3} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a^6 \text {Subst}\left (\int \left (-\frac {1}{a^3 (-1+x)^3}-\frac {2}{a^3 (-1+x)^2}-\frac {1}{a^3 (-1+x)}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a^3}{2 d (1-\cos (c+d x))^2}+\frac {2 a^3}{d (1-\cos (c+d x))}+\frac {a^3 \log (1-\cos (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 72, normalized size = 1.18 \begin {gather*} -\frac {a^3 (1+\cos (c+d x))^3 \left (-8 \csc ^2\left (\frac {1}{2} (c+d x)\right )+\csc ^4\left (\frac {1}{2} (c+d x)\right )-16 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sec ^6\left (\frac {1}{2} (c+d x)\right )}{64 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 52, normalized size = 0.85
method | result | size |
derivativedivides | \(-\frac {a^{3} \left (-\frac {1}{-1+\sec \left (d x +c \right )}+\frac {1}{2 \left (-1+\sec \left (d x +c \right )\right )^{2}}-\ln \left (-1+\sec \left (d x +c \right )\right )+\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(52\) |
default | \(-\frac {a^{3} \left (-\frac {1}{-1+\sec \left (d x +c \right )}+\frac {1}{2 \left (-1+\sec \left (d x +c \right )\right )^{2}}-\ln \left (-1+\sec \left (d x +c \right )\right )+\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) | \(52\) |
risch | \(-i a^{3} x -\frac {2 i a^{3} c}{d}-\frac {2 a^{3} \left (2 \,{\mathrm e}^{3 i \left (d x +c \right )}-3 \,{\mathrm e}^{2 i \left (d x +c \right )}+2 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{4}}+\frac {2 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}\) | \(94\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 59, normalized size = 0.97 \begin {gather*} \frac {2 \, a^{3} \log \left (\cos \left (d x + c\right ) - 1\right ) - \frac {4 \, a^{3} \cos \left (d x + c\right ) - 3 \, a^{3}}{\cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.47, size = 82, normalized size = 1.34 \begin {gather*} -\frac {4 \, a^{3} \cos \left (d x + c\right ) - 3 \, a^{3} - 2 \, {\left (a^{3} \cos \left (d x + c\right )^{2} - 2 \, a^{3} \cos \left (d x + c\right ) + a^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, {\left (d \cos \left (d x + c\right )^{2} - 2 \, d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{3} \left (\int 3 \cot ^{5}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \cot ^{5}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{5}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}\, dx + \int \cot ^{5}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 138 vs.
\(2 (55) = 110\).
time = 0.55, size = 138, normalized size = 2.26 \begin {gather*} \frac {8 \, a^{3} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - 8 \, a^{3} \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - \frac {{\left (a^{3} + \frac {6 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {12 \, a^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) - 1\right )}^{2}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.22, size = 78, normalized size = 1.28 \begin {gather*} \frac {2\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {\frac {3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4}-\frac {a^3}{8}}{d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}-\frac {a^3\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________